#!/bin/sh
currentVersion=$(grep -e "[0-9].[0-9].[0-9]" -o -m 1 src/flatpickr.js )
newVersion=$(semver -i "$currentVersion")

echo "$currentVersion -> $newVersion"

npm version "$newVersion"

sed s/$currentVersion/$newVersion/ --in-place src/flatpickr.js
git commit -m "v$newVersion" src/flatpickr.js

npm run build
git commit -m "build" dist
